/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
import org.junit.Test;
import static org.junit.Assert.*;

/**
 *
 * @author localadm
 */
public class EvaluateBoardTest {
    private GameLogicTeamRoDK logic;


    public EvaluateBoardTest() {
    }
    @Test
    public void testInitializeGame() {
            logic = new GameLogicTeamRoDK();
            logic.initializeGame(7, 6, 1);

            assertEquals(7, logic.getX());
            assertEquals(6, logic.getY());
            assertEquals(0, logic.getGameBoard()[0][0]);
            assertEquals(0, logic.getGameBoard()[1][1]);
           
    }
      @Test
     public void testBoard1() {
     testInitializeGame();
     int[][] board1 = {
         { 0, 0, 0, 0, 0,0 },
         { 0, 0, 0, 0, 0,2 },
         { 0, 0, 0, 0, 0,1 },
         { 0, 0 ,0 ,0 ,2, 1 },
         { 0, 0 ,0 ,0 ,0, 0 },
         { 0, 0 ,0 ,0 ,0, 0 },
         { 0, 0 ,0 ,0 ,0,0 }
     };
         
      int[][] board2 = {
         { 0, 0, 0, 0, 0,0 },
         { 0, 0, 0, 0, 0,0 },
         { 0, 0, 0, 0, 0,1 },
         { 0, 0 ,0 ,0 ,2, 1 },
         { 0, 0 ,0 ,0 ,0, 2 },
         { 0, 0 ,0 ,0 ,0, 0 },
         { 0, 0 ,0 ,0 ,0,0 }
     };
       int[][] board3 = {
         { 0, 0, 0, 0, 0,0 },
         { 0, 0, 0, 0, 0,0 },
         { 0, 0, 0, 0, 2,1 },
         { 0, 0 ,0 ,0 ,2, 1 },
         { 0, 0 ,0 ,0 ,0, 0 },
         { 0, 0 ,0 ,0 ,0, 0 },
         { 0, 0 ,0 ,0 ,0,0 }
     };
          int[][] board4 = {
         { 0, 0, 0, 0, 0,0 },
         { 0, 0, 0, 0, 0,0 },
         { 0, 0, 0, 0, 0,1 },
         { 0, 0 ,0 ,2 ,2, 1 },
         { 0, 0 ,0 ,0 ,0, 0 },
         { 0, 0 ,0 ,0 ,0, 0 },
         { 0, 0 ,0 ,0 ,0,0 }
     };
          int level=11;
     logic.setGameBoard(board1);
      System.out.println("board1");
     System.out.println(logic.minMove2(level, new Pair("max")).column);
     logic.setGameBoard(board2);
     System.out.println(logic.minMove2(level, new Pair("max")).column);
     logic.setGameBoard(board3);
      System.out.println(logic.minMove2(level, new Pair("max")).column);
      logic.setGameBoard(board4);
      System.out.println(logic.minMove2(level, new Pair("max")).column); 
  //  int p1=logic.evaluateBoard(board1);
  //   System.out.println(p1);
  //   int p2=logic.evaluateBoard(board2);
   //    System.out.println(p2);
   
    
    }
    

  
}
